package com.fengshang.wedding.domain.service.internal;

import java.util.Collection;

import com.fengshang.wedding.domain.model.internal.UserEntity;

/**
 * 
 *@author gembin@gmail.com
 * 
 */
public interface IUserPersistenceService {
	/**
	 * 
	 * @param id
	 * @return
	 */
	public UserEntity findUserById(int id);
	/**
	 * 
	 * @param name
	 * @return
	 */
	public UserEntity findUserByName(String name);
	/**
	 * 
	 * @param query
	 * @param pageSize
	 * @param currentPage
	 * @return
	 */
	public Collection<UserEntity> findUserByPagination(String query,
			int pageSize, int currentPage);
	/**
	 * 
	 * @param user
	 */
	public void createUser(UserEntity user);
	/**
	 * @param user
	 * @return
	 */
	public UserEntity updateUser(UserEntity user);
	/**
	 * 
	 * @param user
	 */
	public void removeUser(UserEntity user);
	/**
	 * 
	 * @param id
	 */
	public void removeUser(int id);

	/**
	 * @param pageSize
	 * @return pages
	 */
	public int getTotalPages(int pageSize);

	/**
	 * with default pageSize 20
	 * 
	 * @return pages
	 */
	public int getTotalPages();
	/**
	 * 
	 * @return Total Record
	 */
	public int getTotalRecords();

}
